using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using WebControls;
using BusinessLayer;
using InfraStructureLayer;

public partial class UserControls_uctFiles : SFUserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
      
    }

    protected bool sfrFiles_NeedsDataSource()
    {
        busFiles insBusFiles = new busFiles();
        DataTable insDataTableFiles = insBusFiles.SelectFilesLatest();
        if (insBusFiles.HasErrors)
        {
            MessageBoxShow(insBusFiles);
            return true;
        }

        sfrFiles.SetData(insDataTableFiles);
        return insBusFiles.HasErrors;
    }
    protected void ibtRss_Click(object sender, ImageClickEventArgs e)
    {
        Response.Redirect("~/" + CurrentContext.Language + "/Rss/RssFiles.ashx");
    }
    protected void lbtShowAll_Click(object sender, EventArgs e)
    {
        Response.Redirect("~/" + CurrentContext.Language + "/Files/default.aspx");
    }
    protected string GenerateUrl(object obj)
    {
        Crypto insCrypto = new Crypto();
        return "~/Handlers/Redirect.ashx?Address=" + insCrypto.EncryptURL(obj.ToString());
    }
}
